<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.16"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>LibTools: H:/project/LibTools/src/socket/SockError.h 源文件</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">LibTools
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- 制作者 Doxygen 1.8.16 -->
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',false,false,'search.php','搜索');
});
/* @license-end */</script>
<div id="main-nav"></div>
<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><a class="el" href="dir_9ad1227260954e346101f3844f0abb3d.html">socket</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="headertitle">
<div class="title">SockError.h</div>  </div>
</div><!--header-->
<div class="contents">
<a href="_sock_error_8h.html">浏览该文件的文档.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="preprocessor">#ifndef __SOCKERROR_H__</span></div>
<div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;<span class="preprocessor">#define __SOCKERROR_H__</span></div>
<div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160; </div>
<div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;<span class="preprocessor">#include &quot;../tools/tools.h&quot;</span></div>
<div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;<span class="preprocessor">#include &lt;string&gt;</span></div>
<div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160; </div>
<div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;<a class="code" href="tools_8h.html#a201ce692c9dca6599e5c12d00167419b">DEF_BEG_LIBTOOLS</a></div>
<div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160; </div>
<div class="line"><a name="l00013"></a><span class="lineno"><a class="line" href="class_c_sock_error.html">   13</a></span>&#160;<span class="keyword">class </span><a class="code" href="tools_8h.html#a64152c8b939d1ce06c7c5cb6c97b62f8">LIBTOOLS</a> <a class="code" href="class_c_sock_error.html">CSockError</a></div>
<div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;{</div>
<div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;<span class="keyword">public</span>:</div>
<div class="line"><a name="l00016"></a><span class="lineno"><a class="line" href="class_c_sock_error.html#a1bef13a44763b0fbc3cbbd9c86d8d15a">   16</a></span>&#160;    <span class="keyword">enum</span> <a class="code" href="class_c_sock_error.html#a1bef13a44763b0fbc3cbbd9c86d8d15a">ErrorType</a></div>
<div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;    {</div>
<div class="line"><a name="l00018"></a><span class="lineno"><a class="line" href="class_c_sock_error.html#a1bef13a44763b0fbc3cbbd9c86d8d15aa165f97697ce92cdb961f6ad0d365eec0">   18</a></span>&#160;        <a class="code" href="class_c_sock_error.html#a1bef13a44763b0fbc3cbbd9c86d8d15aa165f97697ce92cdb961f6ad0d365eec0">SUCC</a>,               </div>
<div class="line"><a name="l00019"></a><span class="lineno"><a class="line" href="class_c_sock_error.html#a1bef13a44763b0fbc3cbbd9c86d8d15aad360c22cd3f0fe1336f4fabb9d0845cb">   19</a></span>&#160;        <a class="code" href="class_c_sock_error.html#a1bef13a44763b0fbc3cbbd9c86d8d15aad360c22cd3f0fe1336f4fabb9d0845cb">DISCONNECT</a>,         </div>
<div class="line"><a name="l00020"></a><span class="lineno"><a class="line" href="class_c_sock_error.html#a1bef13a44763b0fbc3cbbd9c86d8d15aaf7b943d3a273053f32ff352b9ac523f6">   20</a></span>&#160;        <a class="code" href="class_c_sock_error.html#a1bef13a44763b0fbc3cbbd9c86d8d15aaf7b943d3a273053f32ff352b9ac523f6">TIMEOUT</a>,            </div>
<div class="line"><a name="l00021"></a><span class="lineno"><a class="line" href="class_c_sock_error.html#a1bef13a44763b0fbc3cbbd9c86d8d15aaf46039751a3ea7e5cdde83bce86f2903">   21</a></span>&#160;        <a class="code" href="class_c_sock_error.html#a1bef13a44763b0fbc3cbbd9c86d8d15aaf46039751a3ea7e5cdde83bce86f2903">CANCELIO</a>,           </div>
<div class="line"><a name="l00022"></a><span class="lineno"><a class="line" href="class_c_sock_error.html#a1bef13a44763b0fbc3cbbd9c86d8d15aa94ea62aaf7ea28879420376443d6f145">   22</a></span>&#160;        <a class="code" href="class_c_sock_error.html#a1bef13a44763b0fbc3cbbd9c86d8d15aa94ea62aaf7ea28879420376443d6f145">SYS_ERROR</a>,          </div>
<div class="line"><a name="l00023"></a><span class="lineno"><a class="line" href="class_c_sock_error.html#a1bef13a44763b0fbc3cbbd9c86d8d15aa2b1ca7583dc68c07ecbb15707cadb04e">   23</a></span>&#160;        <a class="code" href="class_c_sock_error.html#a1bef13a44763b0fbc3cbbd9c86d8d15aa2b1ca7583dc68c07ecbb15707cadb04e">UNINIT</a>,             </div>
<div class="line"><a name="l00024"></a><span class="lineno"><a class="line" href="class_c_sock_error.html#a1bef13a44763b0fbc3cbbd9c86d8d15aad778c60f48f11b31cdfbb9ce397a70d3">   24</a></span>&#160;        <a class="code" href="class_c_sock_error.html#a1bef13a44763b0fbc3cbbd9c86d8d15aad778c60f48f11b31cdfbb9ce397a70d3">BIND_SERVER_ERROR</a>,  </div>
<div class="line"><a name="l00025"></a><span class="lineno"><a class="line" href="class_c_sock_error.html#a1bef13a44763b0fbc3cbbd9c86d8d15aaa1d8c4a8e36db07931d1ec33c3e09a54">   25</a></span>&#160;        <a class="code" href="class_c_sock_error.html#a1bef13a44763b0fbc3cbbd9c86d8d15aaa1d8c4a8e36db07931d1ec33c3e09a54">UNKNOWN</a>,            </div>
<div class="line"><a name="l00026"></a><span class="lineno"><a class="line" href="class_c_sock_error.html#a1bef13a44763b0fbc3cbbd9c86d8d15aac5471da962b8033c53f0324538168542">   26</a></span>&#160;        <a class="code" href="class_c_sock_error.html#a1bef13a44763b0fbc3cbbd9c86d8d15aac5471da962b8033c53f0324538168542">NOLISTEN</a>,           </div>
<div class="line"><a name="l00027"></a><span class="lineno"><a class="line" href="class_c_sock_error.html#a1bef13a44763b0fbc3cbbd9c86d8d15aa81eb3f9d82cd6046e077ef5c0e8350a3">   27</a></span>&#160;        NOFUNCTION          </div>
<div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160;    };</div>
<div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160;<span class="keyword">public</span>:</div>
<div class="line"><a name="l00030"></a><span class="lineno"><a class="line" href="class_c_sock_error.html#a50491b8932c796ea9c87902a7c383bd6">   30</a></span>&#160;    <a class="code" href="class_c_sock_error.html#a1bef13a44763b0fbc3cbbd9c86d8d15a">ErrorType</a> <a class="code" href="class_c_sock_error.html#a50491b8932c796ea9c87902a7c383bd6">_ErrType</a>;     </div>
<div class="line"><a name="l00031"></a><span class="lineno"><a class="line" href="class_c_sock_error.html#ad426611d7b0485ec94755a81751ec275">   31</a></span>&#160;    <a class="code" href="tools_8h.html#a798af1e30bc65f319c1a246cecf59e39">DWORD</a> <a class="code" href="class_c_sock_error.html#ad426611d7b0485ec94755a81751ec275">_SysCode</a>;         </div>
<div class="line"><a name="l00032"></a><span class="lineno">   32</span>&#160;<span class="keyword">public</span>:</div>
<div class="line"><a name="l00033"></a><span class="lineno">   33</span>&#160;    </div>
<div class="line"><a name="l00034"></a><span class="lineno">   34</span>&#160; </div>
<div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160;    <a class="code" href="class_c_sock_error.html">CSockError</a>();</div>
<div class="line"><a name="l00036"></a><span class="lineno">   36</span>&#160;    <a class="code" href="class_c_sock_error.html">CSockError</a>(<a class="code" href="class_c_sock_error.html#a1bef13a44763b0fbc3cbbd9c86d8d15a">ErrorType</a> type);</div>
<div class="line"><a name="l00037"></a><span class="lineno">   37</span>&#160;    <a class="code" href="class_c_sock_error.html">CSockError</a>(<a class="code" href="tools_8h.html#a798af1e30bc65f319c1a246cecf59e39">DWORD</a> code);</div>
<div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160;    <a class="code" href="class_c_sock_error.html">CSockError</a>(<span class="keyword">const</span> <a class="code" href="class_c_sock_error.html">CSockError</a>&amp; ec);</div>
<div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160;    std::string GetErrorMsg() <span class="keyword">const</span>;</div>
<div class="line"><a name="l00042"></a><span class="lineno">   42</span>&#160;    <span class="keywordtype">bool</span> operator ! () <span class="keyword">const</span>;</div>
<div class="line"><a name="l00044"></a><span class="lineno">   44</span>&#160;    <span class="keyword">operator</span> bool() <span class="keyword">const</span>;</div>
<div class="line"><a name="l00046"></a><span class="lineno">   46</span>&#160;    <span class="keywordtype">void</span> SetError(<a class="code" href="class_c_sock_error.html#a1bef13a44763b0fbc3cbbd9c86d8d15a">ErrorType</a> type);</div>
<div class="line"><a name="l00048"></a><span class="lineno">   48</span>&#160;    <span class="keywordtype">void</span> SetSysError(<a class="code" href="tools_8h.html#a798af1e30bc65f319c1a246cecf59e39">DWORD</a> code);</div>
<div class="line"><a name="l00050"></a><span class="lineno">   50</span>&#160;    <a class="code" href="class_c_sock_error.html#a1bef13a44763b0fbc3cbbd9c86d8d15a">ErrorType</a> GetError() <span class="keyword">const</span>;</div>
<div class="line"><a name="l00052"></a><span class="lineno">   52</span>&#160;    <a class="code" href="tools_8h.html#a798af1e30bc65f319c1a246cecf59e39">DWORD</a> GetSysError() <span class="keyword">const</span>;</div>
<div class="line"><a name="l00054"></a><span class="lineno">   54</span>&#160;    <a class="code" href="class_c_sock_error.html">CSockError</a>&amp; operator= (<span class="keyword">const</span> <a class="code" href="class_c_sock_error.html">CSockError</a>&amp; ec);</div>
<div class="line"><a name="l00055"></a><span class="lineno">   55</span>&#160;};</div>
<div class="line"><a name="l00056"></a><span class="lineno">   56</span>&#160; </div>
<div class="line"><a name="l00057"></a><span class="lineno">   57</span>&#160;<a class="code" href="tools_8h.html#ac909db71799bb22cb7d636a34cd785e4">DEF_END_LIBTOOLS</a></div>
<div class="line"><a name="l00058"></a><span class="lineno">   58</span>&#160; </div>
<div class="line"><a name="l00059"></a><span class="lineno">   59</span>&#160;<span class="preprocessor">#endif</span></div>
</div><!-- fragment --></div><!-- contents -->
<div class="ttc" id="aclass_c_sock_error_html_a1bef13a44763b0fbc3cbbd9c86d8d15aad360c22cd3f0fe1336f4fabb9d0845cb"><div class="ttname"><a href="class_c_sock_error.html#a1bef13a44763b0fbc3cbbd9c86d8d15aad360c22cd3f0fe1336f4fabb9d0845cb">CSockError::DISCONNECT</a></div><div class="ttdoc">连接断开</div><div class="ttdef"><b>Definition:</b> <a href="_sock_error_8h_source.html#l00019">SockError.h:19</a></div></div>
<div class="ttc" id="aclass_c_sock_error_html_ad426611d7b0485ec94755a81751ec275"><div class="ttname"><a href="class_c_sock_error.html#ad426611d7b0485ec94755a81751ec275">CSockError::_SysCode</a></div><div class="ttdeci">DWORD _SysCode</div><div class="ttdoc">系统错误码</div><div class="ttdef"><b>Definition:</b> <a href="_sock_error_8h_source.html#l00031">SockError.h:31</a></div></div>
<div class="ttc" id="aclass_c_sock_error_html_a1bef13a44763b0fbc3cbbd9c86d8d15aaf46039751a3ea7e5cdde83bce86f2903"><div class="ttname"><a href="class_c_sock_error.html#a1bef13a44763b0fbc3cbbd9c86d8d15aaf46039751a3ea7e5cdde83bce86f2903">CSockError::CANCELIO</a></div><div class="ttdoc">io被取消</div><div class="ttdef"><b>Definition:</b> <a href="_sock_error_8h_source.html#l00021">SockError.h:21</a></div></div>
<div class="ttc" id="aclass_c_sock_error_html_a1bef13a44763b0fbc3cbbd9c86d8d15aac5471da962b8033c53f0324538168542"><div class="ttname"><a href="class_c_sock_error.html#a1bef13a44763b0fbc3cbbd9c86d8d15aac5471da962b8033c53f0324538168542">CSockError::NOLISTEN</a></div><div class="ttdoc">未监听</div><div class="ttdef"><b>Definition:</b> <a href="_sock_error_8h_source.html#l00026">SockError.h:26</a></div></div>
<div class="ttc" id="aclass_c_sock_error_html"><div class="ttname"><a href="class_c_sock_error.html">CSockError</a></div><div class="ttdoc">套接字错误信息类</div><div class="ttdef"><b>Definition:</b> <a href="_sock_error_8h_source.html#l00013">SockError.h:13</a></div></div>
<div class="ttc" id="aclass_c_sock_error_html_a1bef13a44763b0fbc3cbbd9c86d8d15aad778c60f48f11b31cdfbb9ce397a70d3"><div class="ttname"><a href="class_c_sock_error.html#a1bef13a44763b0fbc3cbbd9c86d8d15aad778c60f48f11b31cdfbb9ce397a70d3">CSockError::BIND_SERVER_ERROR</a></div><div class="ttdoc">绑定服务错误</div><div class="ttdef"><b>Definition:</b> <a href="_sock_error_8h_source.html#l00024">SockError.h:24</a></div></div>
<div class="ttc" id="aclass_c_sock_error_html_a1bef13a44763b0fbc3cbbd9c86d8d15aaf7b943d3a273053f32ff352b9ac523f6"><div class="ttname"><a href="class_c_sock_error.html#a1bef13a44763b0fbc3cbbd9c86d8d15aaf7b943d3a273053f32ff352b9ac523f6">CSockError::TIMEOUT</a></div><div class="ttdoc">超时</div><div class="ttdef"><b>Definition:</b> <a href="_sock_error_8h_source.html#l00020">SockError.h:20</a></div></div>
<div class="ttc" id="atools_8h_html_a201ce692c9dca6599e5c12d00167419b"><div class="ttname"><a href="tools_8h.html#a201ce692c9dca6599e5c12d00167419b">DEF_BEG_LIBTOOLS</a></div><div class="ttdeci">#define DEF_BEG_LIBTOOLS</div><div class="ttdef"><b>Definition:</b> <a href="tools_8h_source.html#l00036">tools.h:36</a></div></div>
<div class="ttc" id="atools_8h_html_a64152c8b939d1ce06c7c5cb6c97b62f8"><div class="ttname"><a href="tools_8h.html#a64152c8b939d1ce06c7c5cb6c97b62f8">LIBTOOLS</a></div><div class="ttdeci">#define LIBTOOLS</div><div class="ttdef"><b>Definition:</b> <a href="tools_8h_source.html#l00095">tools.h:95</a></div></div>
<div class="ttc" id="aclass_c_sock_error_html_a1bef13a44763b0fbc3cbbd9c86d8d15aaa1d8c4a8e36db07931d1ec33c3e09a54"><div class="ttname"><a href="class_c_sock_error.html#a1bef13a44763b0fbc3cbbd9c86d8d15aaa1d8c4a8e36db07931d1ec33c3e09a54">CSockError::UNKNOWN</a></div><div class="ttdoc">未知错误</div><div class="ttdef"><b>Definition:</b> <a href="_sock_error_8h_source.html#l00025">SockError.h:25</a></div></div>
<div class="ttc" id="aclass_c_sock_error_html_a1bef13a44763b0fbc3cbbd9c86d8d15aa94ea62aaf7ea28879420376443d6f145"><div class="ttname"><a href="class_c_sock_error.html#a1bef13a44763b0fbc3cbbd9c86d8d15aa94ea62aaf7ea28879420376443d6f145">CSockError::SYS_ERROR</a></div><div class="ttdoc">系统错误，可以获取系统错误码</div><div class="ttdef"><b>Definition:</b> <a href="_sock_error_8h_source.html#l00022">SockError.h:22</a></div></div>
<div class="ttc" id="atools_8h_html_ac909db71799bb22cb7d636a34cd785e4"><div class="ttname"><a href="tools_8h.html#ac909db71799bb22cb7d636a34cd785e4">DEF_END_LIBTOOLS</a></div><div class="ttdeci">#define DEF_END_LIBTOOLS</div><div class="ttdef"><b>Definition:</b> <a href="tools_8h_source.html#l00038">tools.h:38</a></div></div>
<div class="ttc" id="aclass_c_sock_error_html_a1bef13a44763b0fbc3cbbd9c86d8d15aa165f97697ce92cdb961f6ad0d365eec0"><div class="ttname"><a href="class_c_sock_error.html#a1bef13a44763b0fbc3cbbd9c86d8d15aa165f97697ce92cdb961f6ad0d365eec0">CSockError::SUCC</a></div><div class="ttdoc">正常</div><div class="ttdef"><b>Definition:</b> <a href="_sock_error_8h_source.html#l00018">SockError.h:18</a></div></div>
<div class="ttc" id="aclass_c_sock_error_html_a1bef13a44763b0fbc3cbbd9c86d8d15aa2b1ca7583dc68c07ecbb15707cadb04e"><div class="ttname"><a href="class_c_sock_error.html#a1bef13a44763b0fbc3cbbd9c86d8d15aa2b1ca7583dc68c07ecbb15707cadb04e">CSockError::UNINIT</a></div><div class="ttdoc">未初始化</div><div class="ttdef"><b>Definition:</b> <a href="_sock_error_8h_source.html#l00023">SockError.h:23</a></div></div>
<div class="ttc" id="aclass_c_sock_error_html_a50491b8932c796ea9c87902a7c383bd6"><div class="ttname"><a href="class_c_sock_error.html#a50491b8932c796ea9c87902a7c383bd6">CSockError::_ErrType</a></div><div class="ttdeci">ErrorType _ErrType</div><div class="ttdoc">错误类型</div><div class="ttdef"><b>Definition:</b> <a href="_sock_error_8h_source.html#l00030">SockError.h:30</a></div></div>
<div class="ttc" id="atools_8h_html_a798af1e30bc65f319c1a246cecf59e39"><div class="ttname"><a href="tools_8h.html#a798af1e30bc65f319c1a246cecf59e39">DWORD</a></div><div class="ttdeci">unsigned int DWORD</div><div class="ttdef"><b>Definition:</b> <a href="tools_8h_source.html#l00134">tools.h:134</a></div></div>
<div class="ttc" id="aclass_c_sock_error_html_a1bef13a44763b0fbc3cbbd9c86d8d15a"><div class="ttname"><a href="class_c_sock_error.html#a1bef13a44763b0fbc3cbbd9c86d8d15a">CSockError::ErrorType</a></div><div class="ttdeci">ErrorType</div><div class="ttdef"><b>Definition:</b> <a href="_sock_error_8h_source.html#l00016">SockError.h:16</a></div></div>
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
制作者 &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.16
</small></address>
</body>
</html>
